package com.example.administrator.myapplication.dagger.app;

import android.content.Context;

import javax.inject.Singleton;

import dagger.Module;
import dagger.Provides;

/**
 * @author chenliangzhi
 * @date 2018/3/27
 * @describe
 */
@Module
public class AppModule {
    private Context mContext;

    public AppModule(Context context) {
        mContext = context;
    }

    @Singleton
    @Provides
    public Context provideContext() {
        return this.mContext;
    }

    @Singleton
    @Provides
    public ToastUtil provideToastUtil() {
        return new ToastUtil(mContext);
    }
}
